/*
Erik Peterson	
Proposal title: The Electoral Consequences of Policy Justifications


HYPOTHESES

Stated-Hyp1: "We expect that justification type will not alter policy support among respondents." (p. 2)

	Test-Hyp1: Policy support will not vary between value-based vs. fact-based justification.

Stated-Hyp2: There will be a difference in the effect of value- vs. fact-based justifications on candidate evaluation (p. 2)

	Test-Hyp2: Candidate support will vary between value-based vs. fact-based justification.	
	
Stated-Hyp2: "Our expectation is that values-based justifications will be more effective among those who support the same tax policy position as the candidate, while fact-based justifications will be more effective among those who disagree with a candidate's tax policy position" (p. 2)

	Test-Hyp3: Within those who support the same policy as the candidate, policy support will be higher in value-based vs. fact-based justification condition. 	

	Test-Hyp4: Within those who oppose the candidate's policy, policy support will be higher in fact-based vs. value-based justification condition. 	
		
	Test-Hyp5: Within those who support the same policy as the candidate, candidate evaluation will be higher in value-based vs. fact-based justification condition. 	

	Test-Hyp6: Within those who oppose the candidate's policy, candidate evaluation will be higher in fact-based vs. value-based justification condition. 	
	
	
Stated-Hyp3: Does seeing the justification change the policy attitude? (p. 2)

	Test-Hyp7: Within fact-based justifications, policy attitudes will vary among those who provided evaluation pre-treatment vs. those who provided it post-treatment

	Test-Hyp8: Within value-based justifications, policy attitudes will vary among those who provided evaluation pre-treatment vs. those who provided it post-treatment

********************************************************************************
NOTES:	
*/

clear all
use "PetersonB8.dta", clear

********************************************************************************

* INDICATORS OF EXPERIMENTAL MANIPULATIONS

* preference recorded pre or post-treatment 
	recode XTESS141 (1/4=1 "pre-treatment") (5/8=0 "post-treatment"), gen(pretreat_pref)
	tab pretreat_pref

* value or fact-based treatment	
	recode XTESS141 (1 3 5 7 =1 "fact-based") (2 4 6 8 =0 "value-based"), gen(factual_justification)
	tab factual_justification	
	
* did candidate support or oppose increasing taxes for the wealthy?
	recode XTESS141 (1 5 2 6 =1 "support") (3 7 4 8=0 "oppose"), gen(c_supporter)
	tab c_supporter	
	
* OUTCOME MEASURES

* candidate evaluation
	replace P2=. if P2==-1
	gen candidateeval = P2
	tab candidateeval
	
* policy preference 
	replace P1=. if P1==-1
	replace P3=. if P3==-1
	gen policysupport=P1
	replace policysupport=P3 if pretreat_pref==0
 	tab policysupport
	
* MODERATORS

* does R support the same policy as the candidate?
	* construct binary indicator of R's policy preference
	recode policysupport (1/3=0 "oppose") (4=.) (5/7=1 "support"), gen(r_supporter)
	tab r_supporter

	gen match=1 if c_supporter==r_supporter 
	replace match=0 if c_supporter!=r_supporter 
	replace match=. if r_supporter==.
	tab match
	
********************************************************************************

* ANALYSIS

*Test-Hyp1: Policy support will not vary between value-based vs. fact-based justification.
	reg policysupport i.factual_justification if pretreat_pref==0
	// do not reject. 0.437
	tess 1.factual_justification, init(PetersonB8) bonf(2)
	
*Test-Hyp2: Candidate support will vary between value-based vs. fact-based justification.	
	reg candidateeval i.factual_justification if pretreat_pref==0
	// reject. 0.349
	tess 1.factual_justification, bonf(2)	

*Test-Hyp3: Within those who support the same policy as the candidate, policy support will be higher in value-based vs. fact-based justification condition. 	
	reg policysupport ib1.factual_justification if match==1 
	// reject. 0.544
	tess 0.factual_justification +, bonf(2)	
	
*Test-Hyp4: Within those who oppose the candidate's policy, policy support will be higher in fact-based vs. value-based justification condition. 	
	reg policysupport i.factual_justification if match==0 
	// reject. 0.458		
	tess 1.factual_justification +, bonf(2)	
	
*Test-Hyp5: Within those who support the same policy as the candidate, candidate evaluation will be higher in value-based vs. fact-based justification condition. 	
	reg candidateeval ib1.factual_justification if match==1 
	// reject. 0.454
	tess 0.factual_justification +, bonf(2)	
	
*Test-Hyp6: Within those who oppose the candidate's policy, candidate evaluation will be higher in fact-based vs. value-based justification condition. 	
	reg candidateeval i.factual_justification if match==0 
	// reject. 0.295	
	tess 1.factual_justification +, bonf(2)		
	
*Test-Hyp7: Within fact-based justifications, policy attitudes will vary among those who provided evaluation pre-treatment vs. those who provided it post-treatment
	reg policysupport i.pretreat_pref if factual_justification==1
	// reject. 0.229
	tess 1.pretreat_pref	
	
*Test-Hyp8: Within value-based justifications, policy attitudes will vary among those who provided evaluation pre-treatment vs. those who provided it post-treatment
	reg policysupport i.pretreat_pref if factual_justification==0
	// reject. 0.638	
	tess 1.pretreat_pref	
